package com.ruoyi.slope.inspection.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.slope.inspection.mapper.SlopeInspectionAppearanceMapper;
import com.ruoyi.slope.inspection.domain.SlopeInspectionAppearance;
import com.ruoyi.slope.inspection.service.ISlopeInspectionAppearanceService;

/**
 * 边坡外貌情况巡检Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-05
 */
@Service
public class SlopeInspectionAppearanceServiceImpl implements ISlopeInspectionAppearanceService 
{
    @Autowired
    private SlopeInspectionAppearanceMapper slopeInspectionAppearanceMapper;

    /**
     * 查询边坡外貌情况巡检
     * 
     * @param id 边坡外貌情况巡检主键
     * @return 边坡外貌情况巡检
     */
    @Override
    public SlopeInspectionAppearance selectSlopeInspectionAppearanceById(Long id)
    {
        return slopeInspectionAppearanceMapper.selectSlopeInspectionAppearanceById(id);
    }

    /**
     * 查询边坡外貌情况巡检列表
     * 
     * @param slopeInspectionAppearance 边坡外貌情况巡检
     * @return 边坡外貌情况巡检
     */
    @Override
    public List<SlopeInspectionAppearance> selectSlopeInspectionAppearanceList(SlopeInspectionAppearance slopeInspectionAppearance)
    {
        return slopeInspectionAppearanceMapper.selectSlopeInspectionAppearanceList(slopeInspectionAppearance);
    }

    /**
     * 新增边坡外貌情况巡检
     * 
     * @param slopeInspectionAppearance 边坡外貌情况巡检
     * @return 结果
     */
    @Override
    public int insertSlopeInspectionAppearance(SlopeInspectionAppearance slopeInspectionAppearance)
    {
        slopeInspectionAppearance.setCreateTime(DateUtils.getNowDate());
        return slopeInspectionAppearanceMapper.insertSlopeInspectionAppearance(slopeInspectionAppearance);
    }

    /**
     * 修改边坡外貌情况巡检
     * 
     * @param slopeInspectionAppearance 边坡外貌情况巡检
     * @return 结果
     */
    @Override
    public int updateSlopeInspectionAppearance(SlopeInspectionAppearance slopeInspectionAppearance)
    {
        slopeInspectionAppearance.setUpdateTime(DateUtils.getNowDate());
        return slopeInspectionAppearanceMapper.updateSlopeInspectionAppearance(slopeInspectionAppearance);
    }

    /**
     * 批量删除边坡外貌情况巡检
     * 
     * @param ids 需要删除的边坡外貌情况巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionAppearanceByIds(Long[] ids)
    {
        return slopeInspectionAppearanceMapper.deleteSlopeInspectionAppearanceByIds(ids);
    }

    /**
     * 删除边坡外貌情况巡检信息
     * 
     * @param id 边坡外貌情况巡检主键
     * @return 结果
     */
    @Override
    public int deleteSlopeInspectionAppearanceById(Long id)
    {
        return slopeInspectionAppearanceMapper.deleteSlopeInspectionAppearanceById(id);
    }
}
